<?php
if (hasTour($id))
{
	$msg = "Can't Delete Category - Category has tour!";
	$page = "id=$id&page=".$page;
 	error_transfer($msg,$page);
	exit();
}


//---------------Lay thong tin ve categories sap xoa
$sql_select = "SELECT cName FROM tbltourtype WHERE iId = '$id'";
$rs=$dbsql->query($sql_select);
if($result = $dbsql->fetch_array($rs))
{
	$name = $result["cName"];
}

$sql_delete = "DELETE FROM tbltourtype WHERE iId ='$id'";
$dbsql->query($sql_delete);


Insert_Tracking(" Del tour type $name");

page_transfer("Delete Category Success");
exit();
?>